<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="/css/shoptab.css">
    <link rel="stylesheet" href="/css/base.css">
    <link rel="stylesheet" href="/libs/font_6u7nsm6xut9/iconfont.css">
</head>

<body>
    <div class="header"></div>
    <div class="main">
        <div class="container">
            <div class="shopping" id="shopping_car">
                <table>
                    <thead>
                        <tr>
                            <th>选择</th>
                            <th>图片</th>
                            <th>商品</th>
                            <th>价格</th>
                            <th>数量</th>
                            <th>小计</th>
                            <th>操作</th>
                        </tr>
                    </thead>
                    <tbody id="cartTbody">
                        <script type="text/html" id="cartTemplate">
                            {{each cart item}}
                            <tr data-id="{{item.id}}">
                                <td><input type="checkbox" class="checks" {{item.check? 'checked' : ''}}></td>
                                <td>
                                    <a href="/html/detail.html?id={{item.id}}"><img src={{item.image}}></a>
                                </td>
                                <td><a href="/html/detail.html?id={{item.id}}">{{item.title.slice(0,10)}}...</a></td>
                                <td>￥{{item.price}}元</td>
                                <td><button class="toggleBtn toggleMinus">-</button><span class="amount">{{item.count}}</span><button class="toggleBtn toggleAdd">+</button></td>
                                <td class="rowSum">￥{{(item.price*item.count).toFixed(2)}}元</td>
                                <td><a class="rowDel">删除</a></td>
                            </tr>
                            {{/each}}
                        </script>
                    </tbody>
                </table>
                <div class="cart-footer">
                    <p class="div-selectall"><label><input type="checkbox" id="all-check">全选</label>
                        <a href="javascript:" class="delAll">删除</a></p>
                    <p class="txtRight"><span id="txtNum">1</span>件商品</p>
                    <p class="txtRight">商品金额<span class="red">￥<span id="priceSumSpan">555</span>元</span>
                    </p>
                    <p class="txtRight"><a class="back-btn" href="/html/modules/lists.html">继续购物</a><button class="submit-btn">提交订单</button></p>
                </div>
            </div>
            <div class="empty" id="cart-empty">
                <p><span class="iconfont icon-gouwuchekong"></span>您的购物车还是空的</p>
                <p><a href="/index.html">返回首页</a></p>
                <p><a href="/html/modules/lists.html">去选水果</a></p>
            </div>
        </div>
    </div>
    <div class="footer"></div>
    <script src="/libs/require/require.min.js" data-main="/js/modules/shoptab"></script>
</body>

</html>